import dva from "dva";
import createLoading from "dva-loading";
//import createHistory from 'history/createBrowserHistory'
import "@babel/polyfill";
import { hashHistory } from "dva/router";
import createRouterConfig from "./router";
import './index.css'


// 1. Initialize
const app = dva({
  history: hashHistory,
  onError(error) {
    //message.error(error.message)
  },
});

app.use(createLoading());
// 2. Model
app.model(require("./models/global"));

// 3. Router
app.router(createRouterConfig());

// 4. Start
app.start("#root");

